package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SEntityId extends Object implements IMessageBase
    {
        public var type:int;
        public var typeEx:int;
        public var id:int;
        public const _type:int = 1;
        public static var _regist:SEntityId = new SEntityId(true);

        public function SEntityId(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SEntityId();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeShort(this.type);
            param1.writeShort(this.typeEx);
            param1.writeInt(this.id);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.type = param1.readShort();
            this.typeEx = param1.readShort();
            this.id = param1.readInt();
            
        }

    }
}
